package org.particlethink.service.impl;

import org.particlethink.repository.acceptance.SupplierUserImpl;
import org.particlethink.request.AcceptanceRequest;
import org.particlethink.repository.acceptance.ProjectUserImpl;
import org.springframework.beans.factory.annotation.Autowired;

@org.springframework.stereotype.Service
public class Acceptance {

    @Autowired
    private ProjectUserImpl projectUserRepository;
    @Autowired
    private SupplierUserImpl supplierUserRepository;


    //项目人员 验收发货单
//    public void accept(int deliverId, AcceptanceRequest request) {
//        projectUserRepository.accept(deliverId, request.toAcceptance(deliverId), request.getGoods());
//    }

    //项目人员 拒签发货单
//    public void reject(int deliverId) {
//        projectUserRepository.reject(deliverId);
//    }

    //供货商 确认验收结果
    public void confirm(int supplierId, int deliverID) {
        supplierUserRepository.confirm(supplierId, deliverID);
    }

    //供货商 异议验收结果
    public void objection(int supplierId, int deliverID, String objectionReason) {
        supplierUserRepository.objection(supplierId, deliverID, objectionReason);
    }
}